package br.com.sistef.connection;
     
	
	import java.sql.Connection;
	import java.sql.DriverManager;
	import java.sql.SQLException;

	public class ConnectionDataBase {

	    private static final String URL = "jdbc:derby:dbSistef;user=dbsistef;password=dbsistef";
	    private static final String DRIVER =
		"org.apache.derby.jdbc.EmbeddedDriver";

	    public static Connection getConnection() {
	        System.out.println("Conectando ao Banco de Dados");
	        try {
	            Class.forName(DRIVER);
	            System.out.println("conectado");
	            return DriverManager.getConnection(URL);
	            
	        } catch (ClassNotFoundException e) {
	            e.printStackTrace();
	        } catch (SQLException e) {
	            throw new RuntimeException(e);
	        }
	        return null;
	    }
	}
